﻿using FastORM.Definition;
using FastORM.Entity;
using FastORM.Enum;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;

namespace FastORM.Definition
{
    public interface IFastDBSQLBuild: IFastDB
    {
        string BuildInsertSQL<T>(T Entity);
        string BuildInsertSQL(string TableName,Hashtable RowData);
        string BuildDeleteSQL<T>(T Entity);
        string BuildDeleteSQL<T>();
        string BuildDeleteSQL<T>(string KeyFieldName);
        string BuildDeleteSQL(string TableName, string KeyFieldName);
        string BuildUpdateSQL<T>(T Entity) where T : BaseEntity;
        string BuildUpdateSQL<T>(T Entity,string KeyFieldName) where T : BaseEntity;
        string BuildUpdateSQL<T>(T Entity, string[] UpdateFileds) where T : BaseEntity;
        string BuildUpdateSQL(string TableName, string KeyFieldName, Hashtable RowData);
        string BuildCountSQL<T>();
        string BuildFindSQL<T>();
        string BuildFindSQL(string TableName,string KeyFieldName);
        string BuildFindSQL<T>(string KeyFieldName);
        string BuildFindListSQL<T>(string Columns,string Where,string OrderBy);
        string BuildFindPageSQL<T>(string SQL,int PageIndex, int PageSize);
        string BuildFindPageSQL(string SQL, int PageIndex, int PageSize);
        string BuildFindPageSQL<T>(string Columns, string Where, string OrderBy, int PageIndex,int PageSize);
    }
}
